//
//  ZhuCeViewController.m
//  简单豆瓣不得不交版 1 带
//
//  Created by dllo on 16/6/24.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "ZhuCeViewController.h"

@interface ZhuCeViewController ()<UITextFieldDelegate>

@end

@implementation ZhuCeViewController



- (void)dealloc
{
    
    
    
    [_myTextField6 release];
    [_myTextField5 release];
    [_myTextField4 release];
    [_myTextField3 release];
    [_myTextField2 release];
    [_myTextField1 release];
    [_myLabel6  release];
    [_myLabel5 release];
    [_myLabel4 release];
    [_myLabel3 release];
    [_myLabel2 release];
    [_myLabel1 release];
    [super dealloc];
}



- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    // Do any additional setup after loading the view.
    
    
    
    
   
    UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0,0, 200, 44)];
    titleLabel.font = [UIFont boldSystemFontOfSize:20];
    titleLabel.textColor = [UIColor blackColor];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    titleLabel.text = @"注册";
    self.navigationItem.titleView = titleLabel;
    [self.navigationController.navigationBar setBarTintColor:[UIColor colorWithRed:0.3490 green:0.6118 blue:0.6706 alpha:1.000]];
    
    self.navigationItem.leftBarButtonItem =  [[UIBarButtonItem alloc]initWithTitle:@"用户登录" style:UIBarButtonItemStylePlain target:self action:@selector(leftAction:)];

    self.navigationItem.rightBarButtonItem =  [[UIBarButtonItem alloc]initWithTitle:@"注册" style:UIBarButtonItemStylePlain target:self action:@selector(rightAction:)];
    
    
    
    
    
    [self ceratLabel];
    [self ceratTextField];
    
}



- (void)leftAction:(UIBarButtonItem *)left {
    
    [self.navigationController popViewControllerAnimated:YES];
    
    
}

- (void)rightAction:(UIBarButtonItem *)left {
    
     NSLog(@"我是注册");
    
    
}













- (void)ceratLabel {
    
  //  self.myLabel1 = [[UILabel alloc] initWithFrame:CGRectMake(30, 60, 60, 20)];
    self.myLabel1 = [[UILabel alloc] init];
    self.myLabel1.frame = CGRectMake(30, 110, 100, 20);
    [self.view addSubview:self.myLabel1];
    self.myLabel1.text = @"用户名:";
    self.myLabel1.font = [UIFont systemFontOfSize:20];
    [_myLabel1 release];
    
    self.myLabel2 = [[UILabel alloc] init];
    self.myLabel2.frame = CGRectMake(30, 180, 80, 20);
    [self.view addSubview:self.myLabel2];
    self.myLabel2.text = @"密码:";
    self.myLabel2.font = [UIFont systemFontOfSize:20];
    [_myLabel2 release];

    self.myLabel3 = [[UILabel alloc] init];
    self.myLabel3.frame = CGRectMake(30, 250, 100, 20);
    [self.view addSubview:self.myLabel3];
    self.myLabel3.text = @"确认密码:";
    self.myLabel3.font = [UIFont systemFontOfSize:20];
    [_myLabel3 release];

    self.myLabel4 = [[UILabel alloc] init];
    self.myLabel4.frame = CGRectMake(30, 320, 100, 20);
    [self.view addSubview:self.myLabel4];
    self.myLabel4.text = @"邮箱:";
    self.myLabel4.font = [UIFont systemFontOfSize:20];
    [_myLabel4 release];
    
    self.myLabel5 = [[UILabel alloc] init];
    self.myLabel5.frame = CGRectMake(30, 390, 100, 20);
    [self.view addSubview:self.myLabel5];
    self.myLabel5.text = @"联系方式:";
    self.myLabel5.font = [UIFont systemFontOfSize:20];
    [_myLabel5 release];
    
  
}

- (void)ceratTextField {
    
    self.myTextField1 = [[UITextField alloc] init];
    self.myTextField1.frame = CGRectMake(175, 110, 210, 35);
    [self.view addSubview:self.myTextField1];
    self.myTextField1.font = [UIFont systemFontOfSize:20];
    self.myTextField1.borderStyle = UITextBorderStyleRoundedRect;
    self.myTextField1.layer.borderWidth = 1;
    self.myTextField1.layer.masksToBounds = YES;
    self.myTextField1.layer.cornerRadius = 10;
    self.myTextField1.placeholder = @"请输入用户名";
    [_myTextField1 release];
    
    self.myTextField2 = [[UITextField alloc] initWithFrame:CGRectMake(175, 180, 210, 35)];
    [self.view addSubview:self.myTextField2];
    self.myTextField2.layer.borderWidth = 1;
    self.myTextField2.layer.masksToBounds = YES;
    self.myTextField2.layer.cornerRadius = 10;
    self.myTextField2.placeholder = @"请输入密码";
    self.myTextField2.font = [UIFont systemFontOfSize:20];
    [_myTextField2 release];
    
    
    self.myTextField3 = [[UITextField alloc] initWithFrame:CGRectMake(175, 250, 210, 35)];
    [self.view addSubview:self.myTextField3];
    self.myTextField3.layer.borderWidth = 1;
    self.myTextField3.layer.masksToBounds = YES;
    self.myTextField3.layer.cornerRadius = 10;
    self.myTextField3.placeholder = @"再次输入密码";
    self.myTextField3.font = [UIFont systemFontOfSize:20];
    [_myTextField3 release];

    
    self.myTextField4 = [[UITextField alloc] initWithFrame:CGRectMake(175, 320, 210, 35)];
    [self.view addSubview:self.myTextField4];
    self.myTextField4.layer.borderWidth = 1;
    self.myTextField4.layer.masksToBounds = YES;
    self.myTextField4.layer.cornerRadius = 10;
    self.myTextField4.placeholder = @"请输入邮箱";
    self.myTextField4.font = [UIFont systemFontOfSize:20];
    [_myTextField4 release];

    
    self.myTextField5 = [[UITextField alloc] initWithFrame:CGRectMake(175, 390, 210, 35)];
    [self.view addSubview:self.myTextField5];
    self.myTextField5.layer.borderWidth = 1;
    self.myTextField5.layer.masksToBounds = YES;
    self.myTextField5.layer.cornerRadius = 10;
    self.myTextField5.placeholder = @"请输入联系方式";
    self.myTextField5.font = [UIFont systemFontOfSize:20];
    [_myTextField5 release];
    
    self.myTextField1.delegate = self;
    self.myTextField2.delegate = self;
    self.myTextField3.delegate = self;
    self.myTextField4.delegate = self;
    self.myTextField5.delegate = self;

    

}




// 键盘回收
- (BOOL)textFieldShouldReturn:(UITextField *)textField{
    
    [self.view endEditing:YES];
    return YES;
}







- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
